package requests.settings;

import java.util.regex.Matcher;
import java.util.regex.Pattern;
import main.DemiGui;

public class Settings {
	private String settings = "";
	
	public Settings(String filePath, DemiGui instance) {
		ReadSettings set = new ReadSettings(instance);
		settings = set.read(filePath);
	}
	
	public String getSettings(String content) {
		String result = "";
		
		Pattern pattern = Pattern.compile(content+"='.*?'");
		Matcher m1 = pattern.matcher(settings);
		
		while(m1.find()) {
			result = settings.substring(m1.start()+content.length()+2,m1.end()-1);
			break;
		}
		return result;
	}

}
